# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BareMetalSolution.V2.Model.VlanAttachment do
  @moduledoc """
  VLAN attachment details.

  ## Attributes

  *   `id` (*type:* `String.t`, *default:* `nil`) - Immutable. The identifier of the attachment within vrf.
  *   `interconnectAttachment` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the vlan attachment within vrf. This is of the form projects/{project_number}/regions/{region}/interconnectAttachments/{interconnect_attachment}
  *   `pairingKey` (*type:* `String.t`, *default:* `nil`) - Input only. Pairing key.
  *   `peerIp` (*type:* `String.t`, *default:* `nil`) - The peer IP of the attachment.
  *   `peerVlanId` (*type:* `String.t`, *default:* `nil`) - The peer vlan ID of the attachment.
  *   `qosPolicy` (*type:* `GoogleApi.BareMetalSolution.V2.Model.QosPolicy.t`, *default:* `nil`) - The QOS policy applied to this VLAN attachment. This value should be preferred to using qos at vrf level.
  *   `routerIp` (*type:* `String.t`, *default:* `nil`) - The router IP of the attachment.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :id => String.t() | nil,
          :interconnectAttachment => String.t() | nil,
          :pairingKey => String.t() | nil,
          :peerIp => String.t() | nil,
          :peerVlanId => String.t() | nil,
          :qosPolicy => GoogleApi.BareMetalSolution.V2.Model.QosPolicy.t() | nil,
          :routerIp => String.t() | nil
        }

  field(:id)
  field(:interconnectAttachment)
  field(:pairingKey)
  field(:peerIp)
  field(:peerVlanId)
  field(:qosPolicy, as: GoogleApi.BareMetalSolution.V2.Model.QosPolicy)
  field(:routerIp)
end

defimpl Poison.Decoder, for: GoogleApi.BareMetalSolution.V2.Model.VlanAttachment do
  def decode(value, options) do
    GoogleApi.BareMetalSolution.V2.Model.VlanAttachment.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BareMetalSolution.V2.Model.VlanAttachment do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
